//
//  PresentBottomCell.m
//  ICrEAM
//
//  Created by mac on 16/10/31.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "PresentBottomCell.h"
@interface PresentBottomCell ()
@property (weak, nonatomic) IBOutlet UILabel *cancelLabel;
@property (weak, nonatomic) IBOutlet UILabel *firstCancelTimeL;

@end
@implementation PresentBottomCell

+(instancetype)createPresentBottomCell{
    return [[[NSBundle mainBundle]loadNibNamed:@"PresentBottomCell" owner:nil options:nil]lastObject];
}
- (IBAction)cancelResonClick:(UIButton *)sender {
    if (self.cancelResonBlock) {
        self.cancelResonBlock();
    }
}
- (void)awakeFromNib {
    [super awakeFromNib];
    self.FirstCancelLabel.layer.masksToBounds=YES;
    self.repairTime.layer.masksToBounds=YES;
    self.contentView.backgroundColor=BackgroundColor_Gray;
    self.selectionStyle=UITableViewCellSelectionStyleNone;
    self.oprationBtn.layer.cornerRadius=4;
    self.oprationBtn.layer.masksToBounds=YES;
    self.cancelReson.layer.borderColor=RGB(153, 153, 153).CGColor;
    self.cancelReson.layer.borderWidth=0.5;
    self.repairTime.layer.borderColor=RGB(153, 153, 153).CGColor;
    self.repairTime.layer.borderWidth=0.5;
    self.FirstCancelLabel.layer.borderColor=RGB(153, 153, 153).CGColor;
    self.FirstCancelLabel.layer.borderWidth=0.5;
    if (![ICrEAMTool isVW]) {
        self.repairLable.textColor=KSKTextTitleColor;
        self.cancelLabel.textColor=KSKTextTitleColor;
        self.firstCancelTimeL.textColor=KSKTextTitleColor;
    }
    
    // Initialization code
}
- (IBAction)operationBtnClick:(id)sender {
    if (self.operationBlock) {
        self.operationBlock();
    }
}
-(void)setHideotherView:(BOOL)hideotherView{
    _hideotherView=hideotherView;
    self.otherView.hidden=hideotherView;
}
-(void)setEnableOprationBtn:(BOOL)enableOprationBtn{
    _enableOprationBtn=enableOprationBtn;
    self.oprationBtn.enabled=enableOprationBtn;
    if (enableOprationBtn) {
        if ([ICrEAMTool isVW]) {
                self.oprationBtn.backgroundColor=RGB(32, 154, 216);
        }else{
            self.oprationBtn.backgroundColor=KSKBgColor;
        }
    
        [self.oprationBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    }else{
        self.oprationBtn.backgroundColor=TextFeildBackgroundColor_Gray;
        [self.oprationBtn setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal];
    }
    
}
-(void)setEnablecancelResonBtn:(BOOL)enablecancelResonBtn{
    _enablecancelResonBtn=enablecancelResonBtn;
    self.cancelReson.enabled=enablecancelResonBtn;
    if (enablecancelResonBtn) {
        self.cancelReson.backgroundColor=[UIColor whiteColor];
        [self.cancelReson setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    }else{
        self.cancelReson.backgroundColor=TextFeildBackgroundColor_Gray;
//        self.cancelReson.backgroundColor=[UIColor colorWithHexString:@"eaeaea"];
        [self.cancelReson setTitleColor:RGB(51, 51, 51) forState:UIControlStateNormal];
    }
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

@end
